{% extends "agm1.0/base.html" %}
{%- block body %}
        <section id="home" data-role="page" data-add-back-btn="false">
            <header data-role="header" data-position="fixed">
                <h3>{{ title }}</h3>
            </header>
            <div class="head_pic"><img src="/static/images/tu2.jpg"></div>
            {# <img class="firecracke" src="/static/images/firecracke.png"> #}
            <div data-role="content">
                {{ _t('',
                '<div class="selectlanguege">
                    <select data-role="none">
                            <option>语言/Languege</option>
                            <option value="">中文</option>
                            <option value="/en/">English</option>
                    </select>
                </div>')|safe
                }}
                <ul data-role="listview" data-inset="true" data-icon="arrow-r" class="ui-icon-alt">
                    {% for i, item in enumerate(items) %}
                    {% if item.get('items') %}
                    <li><a href="#home_{{i}}">{{item.get('title')}}</a>
                    {#<ul data-inset="true" class="ui-icon-alt">
                    {% for tagitem in item.get('items') %}
                    <li><a href="{{tagitem.get('link')}}">{{tagitem.get('title')}}</a></li>
                    {% endfor %}</ul>#}
                    </li>
                    {% else %}
                    <li><a href="{{item.get('link')}}" {% if item.get('title') == '会员分享 and False '%}rel="external"{% endif %}>{{item.get('title')}}</a></li>
                    {% endif %}
                    {% endfor %}
                </ul>
                <div class='qr_display'>                
                    <img src="/static/images/wx_qr_430.jpg">{{_t('点击长按扫码', 'Scan Qrcode')}}<br/>{{_t('关注微信公众号', 'Follow Us in Wechat')}}
                </div>
            </div>
            <div data-role="popup" class="popupqr" data-overlay-theme="a" data-theme="d" data-corners="false"><a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a><img class="popphoto" src="/static/images/wx_qr_430.jpg"></div>
            <footer data-role="footer" data-position="fixed" id="footer"><h5><small>©2020 {{_t('AGM 英宝玩具', 'Top-Racer')}}</small></h5></footer>
        </section>
        {% for i, item in enumerate(items) if item.get('items') %}
        <section id="home_{{i}}" data-role="page" data-add-back-btn="true">
            <header data-role="header" data-position="fixed">
                <h3>{{ item.get('title') }}</h3>
                <a href="#home" class="ui-btn-left" data-icon="arrow-l">Back</a>
            </header>
            <div class="head_pic"><img src="/static/images/tu2.jpg"></div>
            <div data-role="content">
                <ul data-role="listview" data-inset="true" data-icon="arrow-r" class="ui-icon-alt">
                    {% for tagitem in item.get('items') %}
                    <li><a href="{{tagitem.get('link')}}">{{tagitem.get('title')}}</a></li>
                    {% endfor %}
                </ul>
                <div class='qr_display'>                
                    <img src="/static/images/wx_qr_430.jpg">{{_t('点击长按扫码', 'Scan Qrcode')}}<br/>{{_t('关注微信公众号', 'Follow Us in Wechat')}}
                </div>
            </div>
            <div data-role="popup" class="popupqr" data-overlay-theme="a" data-theme="d" data-corners="false"><a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a><img class="popphoto" src="/static/images/wx_qr_430.jpg"></div>
            <footer data-role="footer" data-position="fixed" id="footer"><h5><small>©2020 {{_t('AGM 英宝玩具', 'Top-Racer')}}</small></h5></footer>
        </section>        
        {% endfor %}
    {% endblock %}